package com.test.dao;

import com.test.entity.CompAllInfoDto;
import com.test.entity.StuAllInfoDto;
import com.test.entity.TeaAllInfoDto;

public class UserDaoProvider {

    public String userLogin(String u_acount,String u_password){
        StringBuilder sql = new StringBuilder();
        sql.append(" select u_name,u_Identity,u_status from table_user where 1=1");
        if(u_acount!=null&&!"".equals(u_acount)){
            sql.append("  and u_acount = '"+u_acount+"'");
        }else{
            sql.append("  and u_acount = '"+0+"'");
        }
        if(u_password!=null&&!"".equals(u_password)){
            sql.append("  and u_password = '"+u_password+"'");
        }else{
            sql.append("  and u_password = '"+0+"'");
        }
        return sql.toString();
    }

    public String managerLogin(String u_acount,String u_password){
        StringBuilder sql = new StringBuilder();
        sql.append(" select u_name,u_Identity from table_user where 1=1");
        if(u_acount!=null&&!"".equals(u_acount)){
            sql.append("  and u_acount = '"+u_acount+"'");
        }else{
            sql.append("  and u_acount = '"+0+"'");
        }
        if(u_password!=null&&!"".equals(u_password)){
            sql.append("  and u_password = '"+u_password+"'");
        }else{
            sql.append("  and u_password = '"+0+"'");
        }
        return sql.toString();
    }


    public String checkUser(String u_acount){
        StringBuilder sql = new StringBuilder();
        sql.append(" select u_name from table_user where 1=1");
        if(u_acount!=null&&!"".equals(u_acount)){
            sql.append("  and u_acount = '"+u_acount+"'");
        }else{
            sql.append("  and u_acount = '"+0+"'");
        }
        return sql.toString();
    }

    public String selectAllTeacher(){
        StringBuilder sql = new StringBuilder();
        sql.append(" SELECT tea_name,tea_duties from table_teabase_info;");
        return sql.toString();
    }



    public String insertuser(String u_name,String u_acount,String u_password,String u_Identity){
        StringBuilder sql = new StringBuilder();
        sql.append("insert into table_user(u_name,u_acount,u_password,u_Identity) values (");

        if(u_name!=null&&!"".equals(u_name)){
            sql.append(" '"+u_name+"',");
        }else{
            sql.append("'路人甲',");
        }
        if(u_acount!=null&&!"".equals(u_acount)){
            sql.append(" '"+u_acount+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(u_password!=null&&!"".equals(u_password)){
            sql.append(" '"+u_password+"',");
        }else{
            sql.append(" '"+00000000+"',");
        }
        if(u_Identity!=null&&!"".equals(u_Identity)){
            sql.append(" '"+u_Identity+"'");
        }else{
            sql.append(" '"+0+"'");
        }

        sql.append(")");
        return sql.toString();
    }


    public String manaCreateUser(String u_name,String u_acount,String u_Identity){
        StringBuilder sql = new StringBuilder();
        sql.append("insert into table_user(u_name,u_acount,u_Identity) values (");

        if(u_name!=null&&!"".equals(u_name)){
            sql.append(" '"+u_name+"',");
        }else{
            sql.append("'路人甲',");
        }
        if(u_acount!=null&&!"".equals(u_acount)){
            sql.append(" '"+u_acount+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(u_Identity!=null&&!"".equals(u_Identity)){
            sql.append(" '"+u_Identity+"'");
        }else{
            sql.append(" '"+1+"'");
        }

        sql.append(")");
        return sql.toString();
    }

    public String deleteAcount(String u_acount){
        StringBuilder sql = new StringBuilder();
        sql.append(" delete from table_user where 1=1");
        if(u_acount!=null&&!"".equals(u_acount)){
            sql.append("  and u_acount = '"+u_acount+"'");
        }else{
            sql.append("  and u_acount = '"+0+"'");
        }
        return sql.toString();
    }
    public String checkPwd(String u_acount){
        StringBuilder sql = new StringBuilder();
        sql.append(" select u_password from table_user where 1=1");
        if(u_acount!=null&&!"".equals(u_acount)){
            sql.append("  and u_acount = '"+u_acount+"'");
        }else{
            sql.append("  and u_acount = '"+0+"'");
        }
        return sql.toString();
    }
    public String updatepwd(String acount,String u_newpwd){
        StringBuilder sql = new StringBuilder();
        sql.append(" update table_user set ");
        if(u_newpwd!=null&&!"".equals(u_newpwd)){
            sql.append("  u_password = '"+u_newpwd+"'");
        }else{
            sql.append("  u_password = '"+0+"'");
        }
        sql.append(" where 1=1");
        if(acount!=null&&!"".equals(acount)){
            sql.append("  and u_acount = '"+acount+"'");
        }else{
            sql.append("  and u_acount = '"+0+"'");
        }
        return sql.toString();
    }


    public String deleteStuBaseInfo(String acount){
        StringBuilder sql = new StringBuilder();
        sql.append(" delete from table_stubase_info ");

        sql.append(" where 1=1");
        if(acount!=null&&!"".equals(acount)){
            sql.append("  and u_acount = '"+acount+"'");
        }else{
            sql.append("  and u_acount = '"+0+"'");
        }
        return sql.toString();
    }

    public String deleteStuStatusInfo(String acount){
        StringBuilder sql = new StringBuilder();
        sql.append(" delete from table_stustatus_info ");
        sql.append(" where 1=1");
        if(acount!=null&&!"".equals(acount)){
            sql.append("  and u_acount = '"+acount+"'");
        }else{
            sql.append("  and u_acount = '"+0+"'");
        }
        return sql.toString();
    }

    public String deleteStuJobInfo(String acount){
        StringBuilder sql = new StringBuilder();
        sql.append(" delete from table_stujob_info ");
        sql.append(" where 1=1");
        if(acount!=null&&!"".equals(acount)){
            sql.append("  and u_acount = '"+acount+"'");
        }else{
            sql.append("  and u_acount = '"+0+"'");
        }
        return sql.toString();
    }

    public String deleteTeaBaseInfo(String acount){
        StringBuilder sql = new StringBuilder();
        sql.append(" delete from table_teabase_info ");

        sql.append(" where 1=1");
        if(acount!=null&&!"".equals(acount)){
            sql.append("  and u_acount = '"+acount+"'");
        }else{
            sql.append("  and u_acount = '"+0+"'");
        }
        return sql.toString();
    }

    public String deleteCompBaseInfo(String acount){
        StringBuilder sql = new StringBuilder();
        sql.append(" delete from table_compbase_info ");
        sql.append(" where 1=1");
        if(acount!=null&&!"".equals(acount)){
            sql.append("  and u_acount = '"+acount+"'");
        }else{
            sql.append("  and u_acount = '"+0+"'");
        }
        return sql.toString();
    }
    public String deleteCompRecruitInfo(String acount){
        StringBuilder sql = new StringBuilder();
        sql.append(" delete from table_comprecruit_info ");
        sql.append(" where 1=1");
        if(acount!=null&&!"".equals(acount)){
            sql.append("  and u_acount = '"+acount+"'");
        }else{
            sql.append("  and u_acount = '"+0+"'");
        }
        return sql.toString();
    }



    public String selectStuBaseInfo(String acount){
        StringBuilder sql = new StringBuilder();
        sql.append(" SELECT stu_name,stu_sex,stu_politics,stu_idcard,stu_tel,stu_qq,stu_email,stu_address,stu_fromaddress,stu_ec,stu_ectel,stu_counselor,u_acount,stu_province,stu_city,stu_county,stu_fromprovince,stu_fromcity  from table_stubase_info ");

        sql.append(" where 1=1");
        if(acount!=null&&!"".equals(acount)){
            sql.append("  and u_acount = '"+acount+"'");
        }else{
            sql.append("  and u_acount = '"+0+"'");
        }
        return sql.toString();
    }

    public String selectStuStatusInfo(String acount){
        StringBuilder sql = new StringBuilder();
        sql.append(" SELECT stu_code,stu_schoolname,stu_department,stu_profession,stu_class,stu_education,stu_inway,stu_inTime,stu_outTime  from table_stustatus_info ");

        sql.append(" where 1=1");
        if(acount!=null&&!"".equals(acount)){
            sql.append("  and u_acount = '"+acount+"'");
        }else{
            sql.append("  and u_acount = '"+0+"'");
        }
        return sql.toString();
    }

    public String selectStuJobInfo(String acount){
        StringBuilder sql = new StringBuilder();
        sql.append(" SELECT stu_compagreement,stu_compjobstatus,stu_updateagreement,stu_compname,stu_compcode,stu_compnature,stu_compkind,stu_compaddress,stu_compjob,stu_compjobguide,stu_compprovince,stu_compcity,stu_compcounty,u_acount  from table_stujob_info ");

        sql.append(" where 1=1");
        if(acount!=null&&!"".equals(acount)){
            sql.append("  and u_acount = '"+acount+"'");
        }else{
            sql.append("  and u_acount = '"+0+"'");
        }
        return sql.toString();
    }


    public String selectTeaBaseInfo(String acount){
        StringBuilder sql = new StringBuilder();
        sql.append(" SELECT tea_name,tea_schoolname,tea_department,tea_duties,tea_tel,tea_qq,tea_email,u_acount,tea_code  from table_teabase_info ");
        sql.append(" where 1=1");
        if(acount!=null&&!"".equals(acount)){
            sql.append("  and u_acount = '"+acount+"'");
        }else{
            sql.append("  and u_acount = '"+0+"'");
        }
        return sql.toString();
    }

    public String selectCompBaseInfo(String acount){
        StringBuilder sql = new StringBuilder();
        sql.append(" SELECT comp_name,comp_code,comp_nature,comp_kind,comp_address,comp_contact,comp_contacttel,comp_email,comp_province,comp_city,comp_county,u_acount  from table_compbase_info ");
        sql.append(" where 1=1");
        if(acount!=null&&!"".equals(acount)){
            sql.append("  and u_acount = '"+acount+"'");
        }else{
            sql.append("  and u_acount = '"+0+"'");
        }
        return sql.toString();
    }

    public String selectCompRecruitInfo(String acount){
        StringBuilder sql = new StringBuilder();
        sql.append(" SELECT comp_profile,comp_cecruit,comp_salary,u_acount  from table_comprecruit_info ");
        sql.append(" where 1=1");
        if(acount!=null&&!"".equals(acount)){
            sql.append("  and u_acount = '"+acount+"'");
        }else{
            sql.append("  and u_acount = '"+0+"'");
        }
        return sql.toString();
    }

    public String insertStuBaseInfo(StuAllInfoDto stuAllInfoDto){
        StringBuilder sql = new StringBuilder();
        sql.append(" insert into table_stubase_info(stu_name,stu_sex,stu_politics,stu_idcard,stu_tel,stu_qq,stu_email,stu_address,stu_fromaddress,stu_ec,stu_ectel,stu_counselor,stu_province,stu_city,stu_county,stu_fromprovince,stu_fromcity,u_acount) values( ");
        if(stuAllInfoDto.getStu_name()!=null&&!"".equals(stuAllInfoDto.getStu_name())){
            sql.append("'"+stuAllInfoDto.getStu_name()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(stuAllInfoDto.getStu_sex()!=null&&!"".equals(stuAllInfoDto.getStu_sex())){
            sql.append("'"+stuAllInfoDto.getStu_sex()+"',");
        }else{
            sql.append("'"+0+"',");
        }

        if(stuAllInfoDto.getStu_politics()!=null&&!"".equals(stuAllInfoDto.getStu_politics())){
            sql.append("'"+stuAllInfoDto.getStu_politics()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(stuAllInfoDto.getStu_idcard()!=null&&!"".equals(stuAllInfoDto.getStu_idcard())){
            sql.append("'"+stuAllInfoDto.getStu_idcard()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(stuAllInfoDto.getStu_tel()!=null&&!"".equals(stuAllInfoDto.getStu_tel())){
            sql.append("'"+stuAllInfoDto.getStu_tel()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(stuAllInfoDto.getStu_qq()!=null&&!"".equals(stuAllInfoDto.getStu_qq())){
            sql.append("'"+stuAllInfoDto.getStu_qq()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(stuAllInfoDto.getStu_email()!=null&&!"".equals(stuAllInfoDto.getStu_email())){
            sql.append("'"+stuAllInfoDto.getStu_email()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(stuAllInfoDto.getStu_address()!=null&&!"".equals(stuAllInfoDto.getStu_address())){
            sql.append("'"+stuAllInfoDto.getStu_address()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(stuAllInfoDto.getStu_fromaddress()!=null&&!"".equals(stuAllInfoDto.getStu_fromaddress())){
            sql.append("'"+stuAllInfoDto.getStu_fromaddress()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(stuAllInfoDto.getStu_ec()!=null&&!"".equals(stuAllInfoDto.getStu_ec())){
            sql.append("'"+stuAllInfoDto.getStu_ec()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(stuAllInfoDto.getStu_ectel()!=null&&!"".equals(stuAllInfoDto.getStu_ectel())){
            sql.append("'"+stuAllInfoDto.getStu_ectel()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(stuAllInfoDto.getStu_counselor()!=null&&!"".equals(stuAllInfoDto.getStu_counselor())){
            sql.append("'"+stuAllInfoDto.getStu_counselor()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(stuAllInfoDto.getStu_province()!=null&&!"".equals(stuAllInfoDto.getStu_province())){
            sql.append("'"+stuAllInfoDto.getStu_province()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(stuAllInfoDto.getStu_city()!=null&&!"".equals(stuAllInfoDto.getStu_city())){
            sql.append("'"+stuAllInfoDto.getStu_city()+"',");
        }else{
            sql.append("'"+0+"',");
        }

        if(stuAllInfoDto.getStu_county()!=null&&!"".equals(stuAllInfoDto.getStu_county())){
            sql.append("'"+stuAllInfoDto.getStu_county()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(stuAllInfoDto.getStu_fromprovince()!=null&&!"".equals(stuAllInfoDto.getStu_fromprovince())){
            sql.append("'"+stuAllInfoDto.getStu_fromprovince()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(stuAllInfoDto.getStu_fromcity()!=null&&!"".equals(stuAllInfoDto.getStu_fromcity())){
            sql.append("'"+stuAllInfoDto.getStu_fromcity()+"',");
        }else{
            sql.append("'"+0+"',");
        }

        if(stuAllInfoDto.getU_acount()!=null&&!"".equals(stuAllInfoDto.getU_acount())){
            sql.append("'"+stuAllInfoDto.getU_acount()+"'");
        }else{
            sql.append("'"+0+"'");
        }
        sql.append(")");
        return sql.toString();
    }


    public String insertStuStatusInfo(StuAllInfoDto stuAllInfoDto){
        StringBuilder sql = new StringBuilder();
        sql.append(" insert into table_stustatus_info(stu_code,stu_schoolname,stu_department,stu_profession,stu_class,stu_education,stu_inway,stu_inTime,stu_outTime,u_acount) values( ");
        if(stuAllInfoDto.getStu_code()!=null&&!"".equals(stuAllInfoDto.getStu_code())){
            sql.append("'"+stuAllInfoDto.getStu_code()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(stuAllInfoDto.getStu_schoolname()!=null&&!"".equals(stuAllInfoDto.getStu_schoolname())){
            sql.append("'"+stuAllInfoDto.getStu_schoolname()+"',");
        }else{
            sql.append("'"+0+"',");
        }

        if(stuAllInfoDto.getStu_department()!=null&&!"".equals(stuAllInfoDto.getStu_department())){
            sql.append("'"+stuAllInfoDto.getStu_department()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(stuAllInfoDto.getStu_profession()!=null&&!"".equals(stuAllInfoDto.getStu_profession())){
            sql.append("'"+stuAllInfoDto.getStu_profession()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(stuAllInfoDto.getStu_class()!=null&&!"".equals(stuAllInfoDto.getStu_class())){
            sql.append("'"+stuAllInfoDto.getStu_class()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(stuAllInfoDto.getStu_education()!=null&&!"".equals(stuAllInfoDto.getStu_education())){
            sql.append("'"+stuAllInfoDto.getStu_education()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(stuAllInfoDto.getStu_inway()!=null&&!"".equals(stuAllInfoDto.getStu_inway())){
            sql.append("'"+stuAllInfoDto.getStu_inway()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(stuAllInfoDto.getStu_inTime()!=null&&!"".equals(stuAllInfoDto.getStu_inTime())){
            sql.append("'"+stuAllInfoDto.getStu_inTime()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(stuAllInfoDto.getStu_outTime()!=null&&!"".equals(stuAllInfoDto.getStu_outTime())){
            sql.append("'"+stuAllInfoDto.getStu_outTime()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(stuAllInfoDto.getU_acount()!=null&&!"".equals(stuAllInfoDto.getU_acount())){
            sql.append("'"+stuAllInfoDto.getU_acount()+"'");
        }else{
            sql.append("'"+0+"'");
        }

        sql.append(")");
        return sql.toString();
    }


    public String insertStuJobInfo(StuAllInfoDto stuAllInfoDto){
        StringBuilder sql = new StringBuilder();
        sql.append(" insert into table_stujob_info(stu_compagreement,stu_compjobstatus,stu_updateagreement,stu_compname,stu_compcode,stu_compnature,stu_compkind,stu_compaddress,stu_compjob,stu_compjobguide,stu_compprovince,stu_compcity,stu_compcounty,u_acount) values( ");
        if(stuAllInfoDto.getStu_compagreement()!=null&&!"".equals(stuAllInfoDto.getStu_compagreement())){
            sql.append("'"+stuAllInfoDto.getStu_compagreement()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(stuAllInfoDto.getStu_compjobstatus()!=null&&!"".equals(stuAllInfoDto.getStu_compjobstatus())){
            sql.append("'"+stuAllInfoDto.getStu_compjobstatus()+"',");
        }else{
            sql.append("'"+0+"',");
        }

        if(stuAllInfoDto.getStu_updateagreement()!=null&&!"".equals(stuAllInfoDto.getStu_updateagreement())){
            sql.append("'"+stuAllInfoDto.getStu_updateagreement()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(stuAllInfoDto.getStu_compname()!=null&&!"".equals(stuAllInfoDto.getStu_compname())){
            sql.append("'"+stuAllInfoDto.getStu_compname()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(stuAllInfoDto.getStu_compcode()!=null&&!"".equals(stuAllInfoDto.getStu_compcode())){
            sql.append("'"+stuAllInfoDto.getStu_compcode()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(stuAllInfoDto.getStu_compnature()!=null&&!"".equals(stuAllInfoDto.getStu_compnature())){
            sql.append("'"+stuAllInfoDto.getStu_compnature()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(stuAllInfoDto.getStu_compkind()!=null&&!"".equals(stuAllInfoDto.getStu_compkind())){
            sql.append("'"+stuAllInfoDto.getStu_compkind()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(stuAllInfoDto.getStu_compaddress()!=null&&!"".equals(stuAllInfoDto.getStu_compaddress())){
            sql.append("'"+stuAllInfoDto.getStu_compaddress()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(stuAllInfoDto.getStu_compjob()!=null&&!"".equals(stuAllInfoDto.getStu_compjob())){
            sql.append("'"+stuAllInfoDto.getStu_compjob()+"',");
        }else{
            sql.append("'"+0+"',");
        }

        if(stuAllInfoDto.getStu_compjobguide()!=null&&!"".equals(stuAllInfoDto.getStu_compjobguide())){
            sql.append("'"+stuAllInfoDto.getStu_compjobguide()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(stuAllInfoDto.getStu_compprovince()!=null&&!"".equals(stuAllInfoDto.getStu_compprovince())){
            sql.append("'"+stuAllInfoDto.getStu_compprovince()+"',");
        }else{
            sql.append("'"+0+"',");
        }

        if(stuAllInfoDto.getStu_compcity()!=null&&!"".equals(stuAllInfoDto.getStu_compcity())){
            sql.append("'"+stuAllInfoDto.getStu_compcity()+"',");
        }else{
            sql.append("'"+0+"',");
        }

        if(stuAllInfoDto.getStu_compcounty()!=null&&!"".equals(stuAllInfoDto.getStu_compcounty())){
            sql.append("'"+stuAllInfoDto.getStu_compcounty()+"',");
        }else{
            sql.append("'"+0+"',");
        }

        if(stuAllInfoDto.getU_acount()!=null&&!"".equals(stuAllInfoDto.getU_acount())){
            sql.append("'"+stuAllInfoDto.getU_acount()+"'");
        }else{
            sql.append("'"+0+"'");
        }
        sql.append(")");
        return sql.toString();
    }

    public String insertTeaBaseInfo(TeaAllInfoDto teaAllInfoDto){
        StringBuilder sql = new StringBuilder();
        sql.append(" insert into table_teabase_info(tea_name,tea_schoolname,tea_department,tea_duties,tea_tel,tea_qq,tea_email,tea_code,u_acount) values( ");
        if(teaAllInfoDto.getTea_name()!=null&&!"".equals(teaAllInfoDto.getTea_name())){
            sql.append("'"+teaAllInfoDto.getTea_name()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(teaAllInfoDto.getTea_schoolname()!=null&&!"".equals(teaAllInfoDto.getTea_schoolname())){
            sql.append("'"+teaAllInfoDto.getTea_schoolname()+"',");
        }else{
            sql.append("'"+0+"',");
        }

        if(teaAllInfoDto.getTea_department()!=null&&!"".equals(teaAllInfoDto.getTea_department())){
            sql.append("'"+teaAllInfoDto.getTea_department()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(teaAllInfoDto.getTea_duties()!=null&&!"".equals(teaAllInfoDto.getTea_duties())){
            sql.append("'"+teaAllInfoDto.getTea_duties()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(teaAllInfoDto.getTea_tel()!=null&&!"".equals(teaAllInfoDto.getTea_tel())){
            sql.append("'"+teaAllInfoDto.getTea_tel()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(teaAllInfoDto.getTea_qq()!=null&&!"".equals(teaAllInfoDto.getTea_qq())){
            sql.append("'"+teaAllInfoDto.getTea_qq()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(teaAllInfoDto.getTea_email()!=null&&!"".equals(teaAllInfoDto.getTea_email())){
            sql.append("'"+teaAllInfoDto.getTea_email()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(teaAllInfoDto.getTea_code()!=null&&!"".equals(teaAllInfoDto.getTea_code())){
            sql.append("'"+teaAllInfoDto.getTea_code()+"',");
        }else{
            sql.append("'"+0+"',");
        }

        if(teaAllInfoDto.getU_acount()!=null&&!"".equals(teaAllInfoDto.getU_acount())){
            sql.append("'"+teaAllInfoDto.getU_acount()+"'");
        }else{
            sql.append("'"+0+"'");
        }
        sql.append(")");
        return sql.toString();
    }

    public String insertCompBaseInfo(CompAllInfoDto compAllInfoDto){
        StringBuilder sql = new StringBuilder();
        sql.append(" insert into table_compbase_info(comp_name,comp_code,comp_nature,comp_kind,comp_address,comp_contact,comp_contacttel,comp_email,comp_province,comp_city,comp_county,u_acount) values( ");
        if(compAllInfoDto.getComp_name()!=null&&!"".equals(compAllInfoDto.getComp_name())){
            sql.append("'"+compAllInfoDto.getComp_name()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(compAllInfoDto.getComp_code()!=null&&!"".equals(compAllInfoDto.getComp_code())){
            sql.append("'"+compAllInfoDto.getComp_code()+"',");
        }else{
            sql.append("'"+0+"',");
        }

        if(compAllInfoDto.getComp_nature()!=null&&!"".equals(compAllInfoDto.getComp_nature())){
            sql.append("'"+compAllInfoDto.getComp_nature()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(compAllInfoDto.getComp_kind()!=null&&!"".equals(compAllInfoDto.getComp_kind())){
            sql.append("'"+compAllInfoDto.getComp_kind()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(compAllInfoDto.getComp_address()!=null&&!"".equals(compAllInfoDto.getComp_address())){
            sql.append("'"+compAllInfoDto.getComp_address()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(compAllInfoDto.getComp_contact()!=null&&!"".equals(compAllInfoDto.getComp_contact())){
            sql.append("'"+compAllInfoDto.getComp_contact()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(compAllInfoDto.getComp_contacttel()!=null&&!"".equals(compAllInfoDto.getComp_contacttel())){
            sql.append("'"+compAllInfoDto.getComp_contacttel()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(compAllInfoDto.getComp_email()!=null&&!"".equals(compAllInfoDto.getComp_email())){
            sql.append("'"+compAllInfoDto.getComp_email()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(compAllInfoDto.getComp_province()!=null&&!"".equals(compAllInfoDto.getComp_province())){
            sql.append("'"+compAllInfoDto.getComp_province()+"',");
        }else{
            sql.append("'"+0+"',");
        }

        if(compAllInfoDto.getComp_city()!=null&&!"".equals(compAllInfoDto.getComp_city())){
            sql.append("'"+compAllInfoDto.getComp_city()+"',");
        }else{
            sql.append("'"+0+"',");
        }

        if(compAllInfoDto.getComp_county()!=null&&!"".equals(compAllInfoDto.getComp_county())){
            sql.append("'"+compAllInfoDto.getComp_county()+"',");
        }else{
            sql.append("'"+0+"',");
        }

        if(compAllInfoDto.getU_acount()!=null&&!"".equals(compAllInfoDto.getU_acount())){
            sql.append("'"+compAllInfoDto.getU_acount()+"'");
        }else{
            sql.append("'"+0+"'");
        }
        sql.append(")");
        return sql.toString();
    }

    public String insertCompRecruitInfo(CompAllInfoDto compAllInfoDto){
        StringBuilder sql = new StringBuilder();
        sql.append(" insert into table_comprecruit_info(comp_profile,comp_cecruit,comp_salary,u_acount) values( ");
        if(compAllInfoDto.getComp_profile()!=null&&!"".equals(compAllInfoDto.getComp_profile())){
            sql.append("'"+compAllInfoDto.getComp_profile()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(compAllInfoDto.getComp_cecruit()!=null&&!"".equals(compAllInfoDto.getComp_cecruit())){
            sql.append("'"+compAllInfoDto.getComp_cecruit()+"',");
        }else{
            sql.append("'"+0+"',");
        }

        if(compAllInfoDto.getComp_salary()!=null&&!"".equals(compAllInfoDto.getComp_salary())){
            sql.append("'"+compAllInfoDto.getComp_salary()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(compAllInfoDto.getU_acount()!=null&&!"".equals(compAllInfoDto.getU_acount())){
            sql.append("'"+compAllInfoDto.getU_acount()+"'");
        }else{
            sql.append("'"+0+"'");
        }
        sql.append(")");
        return sql.toString();
    }




}
